Repository navigation
Check net.ipv4.ip_forward in validate-cks-node - #14773
Open
bhouse-nexthop wants to merge 1 commit into
Open
bhouse-nexthop wants to merge 1 commit into
bhouse-nexthop wants to merge 1 commit into
Conversation
- validate-cks-node now fails when /proc/sys/net/ipv4/ip_forward is not 1 - kubeadm join preflight requires it; without it an added external node passes validation, is rebooted into the join userdata and then fails kubeadm preflight with a less obvious error - reported together with any missing packages, so both show in one run - reads /proc rather than calling sysctl, which is not on a non-root user's PATH on Debian Signed-off-by: Brad House <bhouse@nexthop.ai>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 4.22 #14773 +/- ##
============================================
- Coverage 18.32% 18.32% -0.01%
+ Complexity 16644 16643 -1
============================================
Files 5939 5939
Lines 537787 537787
Branches 65932 65932
============================================
- Hits 98544 98543 -1
- Misses 428033 428034 +1
Partials 11210 11210
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| exit 1 | ||
| else | ||
| echo 0 | ||
| exit ${IP_FORWARD_DISABLED:-0} |
Member
There was a problem hiding this comment.
this is ok.
but if there are more checks in the future, this is not a good way.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #14772
validate-cks-nodenow also checksnet.ipv4.ip_forward, whichkubeadm joinpreflight requires.ip_forward=0, packages OKip_forward=0, packages missingip_forward=1/proc/sys/net/ipv4/ip_forwardrather than callingsysctl, which is not on a non-root user's PATH on Debian.Touches the same script as #14756 (missing-package array). The two merge cleanly; at most a trivial conflict depending on merge order.
Types of changes
Bug Severity
How Has This Been Tested?
Ran the script in bash with
dpkgstubbed and the/procpath pointed at a temp file:0/00/00/0bash -nclean.